import React, {Component} from 'react'

class Home extends Component {
  constructor() {
    super()

    this.state = {
      name: '章三',
      age: 8,
      userInfo: {
        userName: 'iring'
      }
    }
  }

  render() {
    return (
      <div>
        <h2>我是标题</h2>
        <p>姓名{this.state.name}</p>
        <p>年龄{this.state.age}</p>
        <p>对象{this.state.userInfo.userName}</p>
      </div>
    )
  }
}

export default Home